package fox.framework.rpc.server.message.request;


import java.util.Collection;

/**
 * @author cuichao
 * @Description: RpcServerRequestAPI
 * @Date: create in 2021/2/17 13:56
 */
public final class RpcServerRequestAPI implements RpcServerRequest {

    private RpcServerRequest request;


    public RpcServerRequestAPI(RpcServerRequest request) {
        this.request = request;
    }

    @Override
    public String getPath() {
        return request.getPath();
    }

    @Override
    public int getContentLength() {
        return request.getContentLength();
    }

    @Override
    public void setHeader(String name, String value) {
        request.setHeader(name,value);
    }

    @Override
    public Object[] getRequestBody() {
        return request.getRequestBody();
    }

    @Override
    public String getProtocol() {
        return request.getProtocol();
    }

    @Override
    public String getContentType() {
        return request.getContentType();
    }

    @Override
    public String getHeader(String name) {
        return request.getHeader(name);
    }

    @Override
    public Collection<String> getHeaderNames() {
        return request.getHeaderNames();
    }

    @Override
    public void setAttribute(String name, Object value) {
         request.setAttribute(name,value);
    }

    @Override
    public Object getAttribute(String name) {
        return request.getAttribute(name);
    }
}
